<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap" >
    <div class="h_a">搜索</div>
    <form
            action="${requestScope.FPWEB.rootPath }/case/all${requestScope.FPWEB.urlStuff}"
            method="get" autocomplete="off">
        <div class="search_type cc">
            <label>案例名称：</label><input name="case_name_like" type="text"
                                     class="input length_3 mr10" value="${maps.case_name_like}"
                                     placeholder="案例名称">
            <button type="submit" class="btn btn_submit length_1">搜索</button>
            <button type="button" class="btn  length_2" onclick="window.location.href='${requestScope.FPWEB.rootPath }/case/add${requestScope.FPWEB.urlStuff}'">发布新案例</button>
        </div>
    </form>
    <div class="table_list">
        <c:set var="hashData" value="${models!=null && fn:length(models)>1 }" />
        <table width="100%">
            <thead>
            <tr>
                <td>案例ID</td>
                <td>案例名称</td>
                <td>案例内容</td>
                <td>案例图片</td>
                <td>关联类型</td>
                <td>关联ID</td>
                <td>添加时间</td>
                <td>最后更新时间</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody id="J_word_list">
            <c:forEach items="${pager.pagerModel.dataList }" var="item" varStatus="i">
                <tr>
                    <td>${item.case_id}</td>
                    <td>${item.case_name}</td>
                    <td><TEXTAREA rows="8" cols="90" disabled>${item.case_content}</TEXTAREA></td>
                    <td><img width="200" height="100" src="${item.case_pic}"></td>
                    <td><c:choose>
                        <c:when test="${item.ref_type ==1}">机构</c:when>
                        <c:when test="${item.ref_type ==2}">项目</c:when>
                        <c:when test="${item.ref_type ==3}">医生</c:when>
                    </c:choose></td>
                    <td>${item.ref_id}</td>
                    <td>${item.strMap.create_time}</td>
                    <td>${item.strMap.last_update_time}</td>
                    <td>
                        <a class="btn btn_submit btn_orange" href="${requestScope.FPWEB.rootPath }/case/edit${requestScope.FPWEB.urlStuff}?id=${item.case_id}">修改</a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <%@ include file="../public/pager/pager.pagination.jsp" %>
</div>
